package com.sebscape.sebcms.persistence;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.sebscape.sebcms.persistence.domain.IPersistedObject;

public class CmsPersistenceException extends Exception {
	
	private static final long serialVersionUID = -4454427162354934629L;
	private static Log log = LogFactory.getLog( CmsPersistenceException.class );

	public CmsPersistenceException( String msg, IPersistedObject persistedObject ) {
		log.debug( "EXCEPTION: " + msg );
		if( persistedObject != null ){
			log.debug( "Id: " + persistedObject.getId() );
			log.debug( "Name: " + persistedObject.getName() );
		}
	}

	public CmsPersistenceException( String msg ) {
		log.debug( "EXCEPTION: " + msg );
	}

}
